<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>服装</title>
    <script src="../js/jquery.min.js"></script>
</head>
<body>
<form id="fuz">
    <input type="checkbox" name="fz" value="服装1">服装1
    <input type="checkbox" name="fz" value="服装2">服装2
    <input type="checkbox" name="fz" value="服装3">服装3
    <input type="checkbox" name="fz" value="服装4">服装4
    <input type="button" value="添加" id="add-btn"/>
    <input type="button" value="查看购物车"/>
</form>
<a href="index.html">回到首页</a>
<script>
    $("#add-btn").click(function () {
        var d=$("#fuz").serialize();
//        $.post("addList",d,function (data) {//url data callback
        $.ajax({
            url:"addList",
            type:"post",
            data:d,
            success:function (data) {
               alert(data.status);
            }
        });
        });


</script>
</body>
</html>